import config
from api.ihrm_aip import Ihrmaip

from common.ihrm_ass import IhrmAssert
from parameterized import parameterized

from common.read_ihrm import ReadIhrm


class Testloging:
    ihrm_yy_file_pata = config.BASE_DIR + "/data/data.json"

    @parameterized.expand(ReadIhrm.ysy_json_data(ihrm_yy_file_pata))
    def test_login(self, body, status_code, success, code, message):
        login_resp = Ihrmaip.login_aip(body)
        print(login_resp.json())
        IhrmAssert.login_assert(login_resp, status_code, success, code, message)
